package com.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.rfid.db.bean.Deleted;
import com.rfid.db.bean.Gather;
import com.rfid.db.bean.Level;
import com.rfid.db.bean.Machine;
import com.rfid.db.bean.Operation;
import com.rfid.db.bean.Rfid;
import com.rfid.db.bean.Shunjia;
import com.rfid.db.bean.ShunjiaLevel;
import com.rfid.db.bean.User;

import com.greendao.gen.DeletedDao;
import com.greendao.gen.GatherDao;
import com.greendao.gen.LevelDao;
import com.greendao.gen.MachineDao;
import com.greendao.gen.OperationDao;
import com.greendao.gen.RfidDao;
import com.greendao.gen.ShunjiaDao;
import com.greendao.gen.ShunjiaLevelDao;
import com.greendao.gen.UserDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig deletedDaoConfig;
    private final DaoConfig gatherDaoConfig;
    private final DaoConfig levelDaoConfig;
    private final DaoConfig machineDaoConfig;
    private final DaoConfig operationDaoConfig;
    private final DaoConfig rfidDaoConfig;
    private final DaoConfig shunjiaDaoConfig;
    private final DaoConfig shunjiaLevelDaoConfig;
    private final DaoConfig userDaoConfig;

    private final DeletedDao deletedDao;
    private final GatherDao gatherDao;
    private final LevelDao levelDao;
    private final MachineDao machineDao;
    private final OperationDao operationDao;
    private final RfidDao rfidDao;
    private final ShunjiaDao shunjiaDao;
    private final ShunjiaLevelDao shunjiaLevelDao;
    private final UserDao userDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        deletedDaoConfig = daoConfigMap.get(DeletedDao.class).clone();
        deletedDaoConfig.initIdentityScope(type);

        gatherDaoConfig = daoConfigMap.get(GatherDao.class).clone();
        gatherDaoConfig.initIdentityScope(type);

        levelDaoConfig = daoConfigMap.get(LevelDao.class).clone();
        levelDaoConfig.initIdentityScope(type);

        machineDaoConfig = daoConfigMap.get(MachineDao.class).clone();
        machineDaoConfig.initIdentityScope(type);

        operationDaoConfig = daoConfigMap.get(OperationDao.class).clone();
        operationDaoConfig.initIdentityScope(type);

        rfidDaoConfig = daoConfigMap.get(RfidDao.class).clone();
        rfidDaoConfig.initIdentityScope(type);

        shunjiaDaoConfig = daoConfigMap.get(ShunjiaDao.class).clone();
        shunjiaDaoConfig.initIdentityScope(type);

        shunjiaLevelDaoConfig = daoConfigMap.get(ShunjiaLevelDao.class).clone();
        shunjiaLevelDaoConfig.initIdentityScope(type);

        userDaoConfig = daoConfigMap.get(UserDao.class).clone();
        userDaoConfig.initIdentityScope(type);

        deletedDao = new DeletedDao(deletedDaoConfig, this);
        gatherDao = new GatherDao(gatherDaoConfig, this);
        levelDao = new LevelDao(levelDaoConfig, this);
        machineDao = new MachineDao(machineDaoConfig, this);
        operationDao = new OperationDao(operationDaoConfig, this);
        rfidDao = new RfidDao(rfidDaoConfig, this);
        shunjiaDao = new ShunjiaDao(shunjiaDaoConfig, this);
        shunjiaLevelDao = new ShunjiaLevelDao(shunjiaLevelDaoConfig, this);
        userDao = new UserDao(userDaoConfig, this);

        registerDao(Deleted.class, deletedDao);
        registerDao(Gather.class, gatherDao);
        registerDao(Level.class, levelDao);
        registerDao(Machine.class, machineDao);
        registerDao(Operation.class, operationDao);
        registerDao(Rfid.class, rfidDao);
        registerDao(Shunjia.class, shunjiaDao);
        registerDao(ShunjiaLevel.class, shunjiaLevelDao);
        registerDao(User.class, userDao);
    }
    
    public void clear() {
        deletedDaoConfig.clearIdentityScope();
        gatherDaoConfig.clearIdentityScope();
        levelDaoConfig.clearIdentityScope();
        machineDaoConfig.clearIdentityScope();
        operationDaoConfig.clearIdentityScope();
        rfidDaoConfig.clearIdentityScope();
        shunjiaDaoConfig.clearIdentityScope();
        shunjiaLevelDaoConfig.clearIdentityScope();
        userDaoConfig.clearIdentityScope();
    }

    public DeletedDao getDeletedDao() {
        return deletedDao;
    }

    public GatherDao getGatherDao() {
        return gatherDao;
    }

    public LevelDao getLevelDao() {
        return levelDao;
    }

    public MachineDao getMachineDao() {
        return machineDao;
    }

    public OperationDao getOperationDao() {
        return operationDao;
    }

    public RfidDao getRfidDao() {
        return rfidDao;
    }

    public ShunjiaDao getShunjiaDao() {
        return shunjiaDao;
    }

    public ShunjiaLevelDao getShunjiaLevelDao() {
        return shunjiaLevelDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }

}
